<%@ page language="java" contentType="text/html; charset=UTF-8"
    import="java.util.*,model.common.Message,dao.common.MessageDao,action.common.MessageAction"
     pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="css/Message.css" />
<title>Insert title here</title>
</head>
<body>
<img src="img/未标题-1.jpg" width="1080" height="100" />
<div id="Home">
  <ul>
<li><a href="managerHome.jsp">首页</a></li>
   <li><a>用户管理</a>
     <ul>
       <li><a href="employee.jsp">员工信息</a></li>
       <li><a href="jobsituation.jsp">在职情况</a></li>
     </ul>
     
   </li> 
   <li><a>进货管理</a>
     <ul>
       <li><a href="stockplan.jsp">进货计划</a></li>
       <li><a href="loggingnewgoods.jsp">新商品录入</a></li>
     </ul>  
   
   </li>
   <li><a>库存管理</a>
     <ul>
       <li><a href="repertory.jsp">库存查询</a></li>
     </ul>
   
   </li>
   <li><a>销售管理</a>
     <ul>
       <li><a href="sellsituation.jsp">销售录入</a></li>
     </ul>   
   
   </li>
   <li><a>系统</a>
     <ul>
       <li><a href="systemMessage.jsp">系统报告</a></li>
     </ul>   
   
   </li>
</div>
   
<table class="datalist" id="Employee">  
   <caption><strong><h1>反馈信息</h1></strong></caption>
    <tr>  
        <th scope="col"><strong>信息编号</strong></th>  
        <th scope="col"><strong>信息名字</strong></th>  
        <th scope="col"><strong>信息详情</strong></th>  
        <th scope="col"><strong>发送时间</strong></th>  
        <th scope="col"><strong>发送人姓名</strong></th> 
        <th scope="col"><strong>进行操作</strong></th>         
    </tr> 
    
    		<%
       List<Message> list=new ArrayList<Message>(); 
       MessageAction act=new MessageAction();
	list=act.query(null);
	request.getSession().setAttribute("Message",list); 
    
  if(session.getAttribute("Message")!=null){
	  list=(List)session.getAttribute("Message");
	  if(list.size()>0){
		  Message m;
		  for(int i=0;i<list.size();i++){
			  m=new Message();
		         m=(Message)list.get(i);
		         %>
		<tr>
			<td scope="col"><strong><%=m.getMessageId()%></strong></td>
			<td scope="col"><strong><%=m.getMessageName()%></strong></td>
			<td scope="col"><strong><%=m.getMessageDetail()%></strong></td>
			<td scope="col"><strong><%=m.getMessageDate() %></strong></td>
			<td scope="col"><strong><%=m.getMessagePerson() %></strong></td>
			<td scope="col">
			<strong> <a href="DeleteMessage?id=<%=m.getMessageId()%>" style="width:40px;display:block;float:left"/>删除</a>
			         <a href="editMessage.jsp?id=<%=m.getMessageId()%> "style="width:40px;display:block;float:right"/>修改</a>
			</strong>
			</td>
		</tr>

		<%
		  }
	  }
}

%>
     
    <tr>                  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td> 
        
    </tr>  
    <tr class="altrow">       
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>         
    </tr>  
    <tr>                 
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td> 
    </tr>  
    <tr class="altrow">     
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
    </tr>  
</body>
</html>